/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package src.services.loan;

/**
 *
 * @author jay
 */

import java.util.List;
import java.util.Map;
import javax.faces.model.SelectItem;
import src.domain.loan.Loanfee;
import src.services.CRUEDService;

public class LoanfeeModel implements java.io.Serializable {
    
    private CRUEDService service;
    
    public LoanfeeModel() {
        service = new CRUEDService();
    }
                  
    public List<Loanfee> findAll(Map<String, String> filters) {
        return (List<Loanfee>) service.findAll("Loanfee", filters);
    }
    
    public List<SelectItem> listAll() {
        return service.listAll("Loanfee", "feeId","feeName");
    }
    
    public Loanfee getById(Integer id) {
        return (Loanfee) service.getById(Loanfee.class, id);
    }
    
    public boolean saveData(Loanfee data) {
        return service.saveData(data);
    }
    
    public boolean deleteData(Loanfee data) {
        return service.deleteData(data);
    }
}
